package com.open.capacity.controller;

import com.open.capacity.common.entity.RegionModel;
import com.open.capacity.common.web.Result;
import com.open.capacity.service.RegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/region")
public class RegionController {
    @Autowired
    private RegionService regionService;

    @GetMapping("/findProvince")
    public Object findProvince(){
        List<RegionModel> list=regionService.findProvince();
        return Result.succeed(list,"操作成功");
    }
    @GetMapping("/findLow")
    public Object findLow(RegionModel regionModel){
        List<RegionModel> list=regionService.findLow(regionModel);
        return Result.succeed(list,"操作成功");
    }

}
